import { getAction, postAction } from '@/api/manage'

// 获取部门列表
const list = (params) => getAction('/admin/department/list', params)
// 获取部门父级列表
const parentIds = (params) => getAction(`/admin/department/parentIds/${params}`)
// 删除部门
const del = (params) => postAction(`/admin/department/delete/${params}`)
// 新增部门
const create = (params) => postAction('/admin/department/create', params)
// 编辑部门
const edit = (params) => postAction('/admin/department/update', params)

export {
  list,
  parentIds,
  del,
  create,
  edit
}
